package com.itheima.dubbo.mongodb.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.commons.pojo.Visitors;
import com.itheima.dubbo.interfaces.VisitorsApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * @Author: lqTao
 * @Date: 2021/12/14 11:14
 */
@Service
public class VisitorsApiImpl implements VisitorsApi {

    @Autowired
    MongoTemplate mongoTemplate;
    @Override
    public void sava(Visitors visitors) {
        mongoTemplate.save(visitors);
    }
}
